Static Contract Checking via First-Order Logic
نویسنده
چکیده
We enrich the static semantics of Haskell in order to give stronger static guarantees about the input/output behavior of programs. Our approach has two parts: a contract system for Haskell, and a novel strategy for statically checking that a term satisfies a contract. The contract system includes refinement types, which refine Haskell types by arbitrary Boolean-valued Haskell expressions, and a “crash free” predicate, which is true of expressions that can’t cause a run-time exception in any “safe” context. Our novel contract-checking strategy is to translate a contract-annotated source program into a theorem in first-order logic, and then invoke an automatic theorem prover to prove (or refute) the theorem.
منابع مشابه
Combining Static and Dynamic Contract Checking for Curry
Static type systems are usually not sufficient to express all requirements on function calls. Hence, contracts with preand postconditions can be used to express more complex constraints on operations. Contracts can be checked at run time to ensure that operations are only invoked with reasonable arguments and return intended results. Although such dynamic contract checking provides more reliabl...
متن کاملCompositional and Decidable Checking for Dependent Contract Types
Simple type systems perform compositional reasoning in that the type of a term depends only on the types of its subterms, and not on their semantics. Contracts offer more expressive abstractions, but static contract checking systems typically violate those abstractions and base their reasoning directly upon the semantics of terms. Pragmatically, this noncompositionality makes the decidability o...
متن کاملFacultad De Informática Universidad Politécnica De Madrid Master Thesis Master in Artificial Intelligence Research Dynamic Checking of Assertions for Higher - Order Predicates
In order to improve the quality of software products various techniques can be used within the software development life cycle. A topic that has received significant interest in recent years has been the technique of program validation via static and/or dynamic checking of user–provided assertions. Such assertions can be considered a (partial) program specification in the form of annotations in...
متن کاملStatic Partial Order Reductions for Probabilistic Systems
The present Master’s thesis seeks the development and analysis of static partial order reduction techniques for the models of probabilistic systems. The properties of those systems can be verified via model checking technique. Model checking suffers from the problem known as State Space Explosion, which can make the verification process intractable. Partial order reductions are aimed at allevia...
متن کاملDeductive Software Verification
Deductive Software Verification is characterized by three ingredients: first, target programs as well as the properties to be verified are represented as logical formulae that must be proven to be valid; second, validity is proven by deduction in a logic calculus; third, computer assistance is used for proof search and bookkeeping. In contrast to static analysis and model checking it is possibl...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2014